package com.gqc.test01;

import javax.servlet.http.HttpServlet;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.core.io.FileSystemResource;


public class UserServlet extends HttpServlet{
	public UserServlet() {
		BeanFactory bean = new XmlBeanFactory(new FileSystemResource("test01.xml"));
		ApplicationContext applicationContext = new ClassPathXmlApplicationContext("test01.xml");
		UserDao user = applicationContext.getBean("userdao",UserDaoImp.class);
		Object bean2 = (UserDaoImp)applicationContext.getBean("userDao");
		user.delete();
		user.update();
	}
}
